package br.ufrj.dcc.comp2.musica.vista;

import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class PainelContatoFormularioDadosPessoais extends JPanel {

	private static final long serialVersionUID = 1L;

	JLabel labelEmail;
	JLabel labelTelefoneResidencial;
	JLabel labelTelefoneCelular;
	
	JTextField campoEmail;
	JTextField campoTelefoneResidencial;
	JTextField campoTelefoneCelular;
	
	GridBagConstraints gBagCons;
	
	public PainelContatoFormularioDadosPessoais() {
		
		this.setBorder(BorderFactory.createTitledBorder("Contato"));
		this.setLayout(new GridBagLayout());
		
		labelEmail = new JLabel("E-mail *");
		labelTelefoneResidencial = new JLabel ("Tel. Residencial");
		labelTelefoneCelular = new JLabel ("Tel. Celular");
		
		campoEmail = new JTextField(20);
		campoTelefoneResidencial = new JTextField(10);
		campoTelefoneCelular = new JTextField(10);
		
		gBagCons = new GridBagConstraints();
		gBagCons.insets = new Insets(2,10,2,10);
		gBagCons.anchor = GridBagConstraints.WEST;
		
		adicionar(labelEmail, 0, 0);
		adicionar(campoEmail, 1, 0);
		adicionar(labelTelefoneResidencial, 0, 1);
		adicionar(campoTelefoneResidencial, 1, 1);
		adicionar(labelTelefoneCelular, 0, 2);
		adicionar(campoTelefoneCelular, 1, 2);
	
	}
	
	public void adicionar(Component c, int x, int y) {
		
		gBagCons.gridx = x;
		gBagCons.gridy = y;
	
		add(c, gBagCons);
	}

	public JLabel getLabelEmail() {
		return labelEmail;
	}
	
	public void setLabelEmail(String labelEmail) {
		this.labelEmail.setText(labelEmail);
	}

	public JLabel getLabelTelefoneResidencial() {
		return labelTelefoneResidencial;
	}

	public JLabel getLabelTelefoneCelular() {
		return labelTelefoneCelular;
	}

	public JTextField getCampoEmail() {
		return campoEmail;
	}

	public JTextField getCampoTelefoneResidencial() {
		return campoTelefoneResidencial;
	}

	public JTextField getCampoTelefoneCelular() {
		return campoTelefoneCelular;
	}

	public GridBagConstraints getGBagCons() {
		return gBagCons;
	}
}
